package com.example.tests;

import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {

  @Test
  public void testNonEmptyContactCreation() throws Exception {
	openMainPage();  
    
    initContactCreation();
   
    ContactData contact = new ContactData();
    contact.firstName = "First name";
    contact.lastName = "Last name";
    contact.address = "Address";
    contact.telephoneHome = "Telephone Home";
    contact.telephoneMobile = "Telephone Mobile";
    contact.telephoneWork = "Telephone Work";
    contact.email = "E-mail";
    contact.email2 = "E-mail2";
    contact.day = "2";
    contact.month = "February";
    contact.year = "1990";
    contact.address2 = "Address Secondary";
    contact.telephoneHome2 = "Home Secondary";
	fillContactForm(contact);
    
    submitContactCreation();
    
    returnContactsPage();
  }
  
  @Test
  public void testEmptyContactCreation() throws Exception {
	openMainPage();  
    
    initContactCreation();
   
    ContactData contact = new ContactData();
    contact.firstName = "First name for Empty Contact";
    contact.lastName = "Last name for Empty Contact";
    contact.address = "Address for Empty Contact";
    contact.telephoneHome = "Telephone Home for Empty Contact";
    contact.telephoneMobile = "Telephone Mobile for Empty Contact";
    contact.telephoneWork = "Telephone Work for Empty Contact";
    contact.email = "E-mail for Empty Contact";
    contact.email2 = "E-mail2 for Empty Contact";
    contact.day = "2";
    contact.month = "February";
    contact.year = "1990";
    contact.address2 = "Address Secondary for Empty Contact";
    contact.telephoneHome2 = "Home Secondary for Empty Contact";

    fillContactForm(contact);
    
    submitContactCreation();
    
    returnContactsPage();
  }
}
